import request from '@/utils/myAioxs'

//我的培训班列表
export function getTrainingCourseList(data) {
  return request({
    url: '/user-center/v1/query-training-course',
    method: 'post',
    data
  })
}
export function getCourseList(data) {
  return request({
    url: '/user-center/v1/query-user-date-course',
    method: 'post',
    data
  })
}
//我的消息列表
export function getNewsList(data) {
  return request({
    url: '/user-center/v1/query-news',
    method: 'post',
    data
  })
}
//阅读我的消息
export function handleReadNews(data) {
  return request({
    url: '/user-center/v1/read-temporary-news',
    method: 'post',
    data
  })
}
//删除我的消息
export function getDeleteNews(data) {
  return request({
    url: '/user-center/v1/delete-temporary-news',
    method: 'post',
    data
  })
}
//我的证书列表
export function getCertificateList(data) {
  return request({
    url: '/user-center/v1/query-certificate',
    method: 'post',
    data
  })
}


//获取订单列表
export function getOrderList(data) {
  return request({
    url: '/order/v1/user-orders',
    method: 'post',
    data
  })
}

//删除订单
export function delOrder(id) {
  return request({
    url: `/order/v1/del/${id}`,
    method: 'get',
  })
}

//取消订单
export function cancelOrder(id) {
  return request({
    url: `/order/v1/cancel/${id}`,
    method: 'get',
  })
}


export function getOrderDetail(data) {
  return request({
    url: `/order/v1/user-order-detail/`,
    method: 'post',
    data
  })
}

//购物车列表

export function getCartList(data) {
  return request({
    url: `/shopping-cart/v1/list`,
    method: 'post',
    data
  })
}

//购物车移出课程
export function removeCart(data) {
  return request({
    url: `/shopping-cart/v2/remove`,
    method: 'post',
    data
  })
}

//培训档案
export function queryCertList(data) {
  return request({
    url: `/user-center/v1/query-user-cert-list`,
    method: 'post',
    data
  })
}
export function getCertInfo(planId) {
  return request({
    url: `/user-plan/v1/info/${planId}`,
    method: 'post',
  })
}
export function getMenu() {
  return request({
    url: `/index/v1/app-element/PC`,
    method: 'get',
  })
}
